package com.project.bean;

import java.time.LocalDate;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

@TableName("t_forumReplay")
public class ReplayBean {
    /**
     * 回帖ID
     */
    @TableId(value = "pk_replayId",type = IdType.AUTO)
    private Integer id;
    /**
     * 回帖标题
     */
    @TableField("r_title")
    private  String title;
    /**
     * 回帖内容
     */
    @TableField("r_content")
    private String content;

    @TableField(exist = false)
    private UserBean replayor;

    @TableField("fk_postsId")
    private Integer postsId;

    @TableField("fk_userId")
    private Integer userId;

    @TableField("r_date")
    private LocalDate rDate=LocalDate.now();

    public ReplayBean() {
    }

    public ReplayBean(String title, String content, Integer postsId,Integer userId) {
        this.title = title;
        this.content = content;
        this.postsId=postsId;
        this.userId=userId;
    }

    
    public LocalDate getRDate() {
        return rDate;
    }

    public void setRDate(LocalDate rDate) {
        this.rDate = rDate;
    }

    

    public Integer getPostsId() {
        return postsId;
    }

    public void setPostsId(Integer postsId) {
        this.postsId = postsId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public UserBean getReplayor() {
        return replayor;
    }

    public void setReplayor(UserBean replayor) {
        this.replayor = replayor;
    }

    
    @Override
    public String toString() {
        return "ReplayBean{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", replayor=" + replayor +
                ", postsId=" + postsId +
                ", userId=" + userId +
                ", rDate=" + rDate +
                '}' + "\n";
    }

    
}
